<template>
	<my-field :label="data.label" :needRightIcon="false">
		<u-rate v-model="obj.value" :allowHalf="data.config.allowHalf" activeColor="#2d58cb" size="22" :readonly="data.readonly"></u-rate>
	</my-field>
</template>
<script>
import MyField from '@/pages_form/components/my-field.vue'
export default {
	components: {MyField},
    props: {
        data: {
            type: Object,
            required: true
        }
    },
    data(){
        return {
    		obj: JSON.parse(JSON.stringify(this.data))
        }
    },
    watch:{
        obj: {
    	    deep: true,
    	    handler() {
    		   this.$emit('fieldValueChange', this.obj)
    	    }
        }
    }
}
</script>
